#pragma once
#include "stdafx.h"
#include "UvServer.h"
#include "CmdClient.h"
#include <set>

class CmdServer : public UvServer
{
private:
	CmdServer();
	virtual ~CmdServer();
public:
	static CmdServer* Instance();
	void CallbackSend(int filter, const unsigned char* pData, int length);
	bool UpdateMcu(const char* filepath);
	bool putCanRtc(int time)
protected:
	virtual void OnConnect(uv_tcp_t* client);
	virtual void ThreadFunc();
private:
	static CmdServer* m_pInstance;
	set<CmdClient*>   m_Clients;
};
